//
//  NewBianGenFinishViewController.m
//  wangzhe
//
//  Created by 李 佳伟 on 2018/3/22.
//  Copyright © 2018年 李 佳伟. All rights reserved.
//

#import "NewBianGenFinishViewController.h"
#import "JTCSM.h"

static CGFloat myinfoHeight = 50;
@interface NewBianGenFinishViewController ()
{
    UIImageView *headerImageView;

}
@end

@implementation NewBianGenFinishViewController

- (void)gotBack{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    [df isRemoveTarbar:YES];
    self.navigationController.navigationBar.hidden = YES;
    self.view.backgroundColor = [UIColor whiteColor];
    
    headerImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, KCONTROLLERWith, KCONTROLLERWith*2/3)];
    headerImageView.image = [UIImage imageNamed:@"变更背景.png"];
    [self.view addSubview:headerImageView];
    headerImageView.userInteractionEnabled = YES;
    UIImage * firstImage = [UIImage imageNamed:@"erweimafanhui.png"];
    CGRect firstFrame = CGRectMake(20, 20, 50, 44);
    CGFloat width = firstFrame.size.width;
    CGFloat height = firstFrame.size.height;
    CGFloat imagesize = 20;
    UIButton * leftButton = [[UIButton alloc]initWithFrame:firstFrame];
    [leftButton setImage:firstImage forState:UIControlStateNormal];
    [leftButton addTarget:self action:@selector(gotBack) forControlEvents:UIControlEventTouchUpInside];
    leftButton.imageEdgeInsets = UIEdgeInsetsMake((height-imagesize)/2, 0, (height-imagesize)/2, (width-imagesize));
    [self.view addSubview:leftButton];
    //    140   150 110  0.35 0.375  0.275
    
    UILabel *titleLabel = [UILabel initWithFrame:CGRectMake(0, 20, KCONTROLLERWith, 44) text:@"变更审核" font:20 textAlignment:NSTextAlignmentCenter texcolor:RGBACOLOR(255, 255, 255, 1) backgroundColor:nil];
    [self.view addSubview:titleLabel];
    
    
    UIView *bottomeView = [[UIView alloc]init];
    bottomeView.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:bottomeView];
    NSString *str = @"提交审核，请等待工作人员审核！";
    CGRect rect = [df labelHeightWithContent:str width:KCONTROLLERWith font:16];
    CGFloat labelSpace = (KCONTROLLERWith-rect.size.width)/2>50?50:(KCONTROLLERWith-rect.size.width)/2;
    UILabel *biaotiLabel = [UILabel initWithFrame:CGRectMake(labelSpace, 0, KCONTROLLERWith-2*labelSpace, myinfoHeight) text:str font:16 textAlignment:NSTextAlignmentCenter texcolor:[df colorWithHexString:@"333333" alpha:1] backgroundColor:nil];
    [bottomeView addSubview:biaotiLabel];
    
    UILabel *contentLabel = [UILabel initWithFrame:CGRectMake(labelSpace, KVIEW_Y(biaotiLabel), biaotiLabel.LC_width, 20) text:@"预计5个工作日内审核完毕，审核结果会短信通知到您注册的手机上。" font:12 textAlignment:NSTextAlignmentLeft texcolor:[df colorWithHexString:@"999999" alpha:1] backgroundColor:nil];
    [bottomeView addSubview:contentLabel];
    CGFloat contentLabelHeight = [df getSpaceLabelLineSpacing:15 withFont:[UIFont systemFontOfSize:12] withLabel:contentLabel];
    contentLabel.frame = CGRectMake(contentLabel.LC_x, contentLabel.LC_y, contentLabel.LC_width, contentLabelHeight);
    
    bottomeView.frame = CGRectMake(0, KVIEW_Y(headerImageView)+15, KCONTROLLERWith, KVIEW_Y(contentLabel));
    
    UIButton *tijiaobutton = [UIButton buttonWithType:UIButtonTypeCustom];
    tijiaobutton.frame = CGRectMake(25, KVIEW_Y(bottomeView)+50, KCONTROLLERWith-40, 50);
    [tijiaobutton addTarget:self action:@selector(tijiao) forControlEvents:UIControlEventTouchUpInside];
    [df layerWithView:tijiaobutton radius:8 width:0 color:nil];
    tijiaobutton.backgroundColor = [df colorWithHexString:@"42a4ff" alpha:1];
    [tijiaobutton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [tijiaobutton setTitle:@"知道了" forState:UIControlStateNormal];
    [self.view addSubview:tijiaobutton];
    // Do any additional setup after loading the view.
}

- (void)tijiao{
    [self.navigationController popToRootViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
